[main]
filesize=35062469
sha512=e09a08002b723a056b7a53dea275794a9df104296e7733ec1d7023888f23466095b38614f3ab1acbbb095d10cca70cc14c35c3519a41800eadd6863beb85e3a9

[mirrors]
http://download.oracle.com/berkeley-db/db-5.3.21.tar.gz

[deps]

[build]
patch -p1 < "$K/bdb-configure.patch"
cd build_unix
mv ../config.cache .

[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') \
  --with-sysroot=$butch_root_dir"

CFLAGS="-D_GNU_SOURCE" ../dist/configure -C \
    --prefix="$butch_prefix" --enable-compat185 $xconfflags \
    --enable-shared --enable-static --enable-dbm \
    db_cv_clock_monotonic=yes db_cv_build_sequence=yes db_cv_mmap_extend=yes

sed -i 's/^install_docs:/install_docs:\n\ttrue\ninstall_crap:/' Makefile
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install
